package com.slj.uitil;

import lombok.Data;

import java.util.List;
@Data
public class Page<E> {
    //当前页
    private Integer pageNum=1;

    //每页展示数量
    private Integer pageSize=4;

    //总记录数
    private Integer totalCount;

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
        this.totalPage = totalCount%pageSize>0?totalCount/pageSize+1:totalCount/pageSize;

    }

    //总页数
    private Integer totalPage;

    //数据集合
    private List<E> data;

}
